const app = getApp()
Page({
    data:{
        datas:[]
    },
    onChange(event){
        if(event.detail == "0") {
            wx.redirectTo({
              url: '../service/service',
            })
        }else if(event.detail == "1") {
            wx.redirectTo({
              url: '../purchase/purchase',
            })
        }
    },
    onLoad(){
        app.api.getData('admin/allservice','none',(res)=>{
            this.setData({
                datas:res.data
            })
        })
    }
})